package org.linkerproject.html;

import org.imlinker.util.StringUtils;

public class HtmlText extends HtmlElement {

	public HtmlText(String label, String text) {
		this.label = label;
		this.text = text;
	}

	@Override
	public String output() {
		if (StringUtils.isNotEmpty(text)) {
			if (StringUtils.isNotEmpty(label)) {
				return "<" + label + ">" + text + "</" + label + ">";
			} else {
				return text;
			}
		}

		return "";
	}

	private String text;

	private String label;

}
